package com.ys.erp.entity.data.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * @author lwj
 * @date 2023/4/8
 */
    
@Data
@TableName(value = "t_role")
@Accessors(chain = true)
public class Role {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "shop_code")
    private String shopCode;

    /**
     * 角色名称
     */
    @TableField(value = "role_name")
    private String roleName;

    /**
     * 权限，json格式
     */
    @TableField(value = "right_ids")
    private String rightIds;

    @TableField(value = "tenant_id")
    private Integer tenantId;

    @TableField(value = "tenant_two_id")
    private Integer tenantTwoId;

    @TableField(value = "version")
    @Version
    private Integer version;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;
}